﻿package com.sllp.C71S3TsllpShop.bean;

import java.io.FileWriter;
import java.io.IOException;

/* *
 *类名：AlipayConfig
 *功能：基础配置类
 *详细：设置帐户有关信息及返回路径
 *修改日期：2017-04-05
 *说明：
 *以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
 *该代码仅供学习和研究支付宝接口使用，只是提供一个参考。
 */

public class AlipayConfig {
	
//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

	// 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
	public static String app_id = "2016101500689736";
	
	// 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKbzu3A2LAVsriBGb0APWqWyhABAQqfVBkuvagmi1ptwVPeMYu0cY/jXqhaG/29SkRdow+H4MfIu2/VpYWhv8+Jnq8n7XomKAohTeWserall8sdssoKTVJ0+HZ5pXf6wzUw52bNBdro9vbcYFzcS+IDtvwbxREC8Lp0soQ9RNB0bAgMBAAECgYAbambbVGoCMgieEDLwqBTQpPH8QJExkk/IWfPlxTHMsLOjOxB7s2/PS0sJC/4iP8LHv1J7ZxB8nqlMMZPnXIsF3O5NCmBomG9je5rtbHCX12bPbFYYftdGN9UZuN+fUIDCccLLDgrGa/CPIuX5MaaGfTRTSnvQcZsohIDL8u6JgQJBAM9y69A3Xfa2gEeqkLghxTYhHdPcUkpHoIcPSCtYGtIicHTaHQJT1HF2ojEZI6kGNBH46rMW9CDZcjz/ehIW1vsCQQDOBnyfxZ5mn+hin00qgbQi6SUS7NB+uHgZB1qeqbu2s+w30IQZy00pNyqDoUFVHYra2b83A7JiD+VXmTL2pXhhAkEAmynO/ddb3dvViUUnp8ICmyEcCUoi9tIqXLrudRUaQpBl4tD9n68KGK/uUqEGDjfInKS9D6UchrF+A+fm6z7QHwJBAL9Cdl88bhiHSoyDpndXgYsHNUukXMnHJnbVxOKWX5T04s3N3VS0zyT7+ZPJF4WUr1sL2d+QpwEyEI6Jwi4G3wECQEsoT8bARI8B8PTiw0utPsVwslJ/3k5iHl57i+wWxyC+4S9ZodYtSovPeFgaOsLUiKNj/P+9Z4jM3MWmmzs3J2I=";
	
	// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIgHnOn7LLILlKETd6BFRJ0GqgS2Y3mn1wMQmyh9zEyWlz5p1zrahRahbXAfCfSqshSNfqOmAQzSHRVjCqjsAw1jyqrXaPdKBmr90DIpIxmIyKXv4GGAkPyJ/6FTFY99uhpiq0qadD/uSzQsefWo0aTvP/65zi3eof7TcZ32oWpwIDAQAB";

	
//	// 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
//	public static String app_id = "2021001140621677";
//	
//	// 商户私钥，您的PKCS8格式RSA2私钥
//    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC/CSS5fqo2L0/lKzZcjLsSswunEgXrRFlBQA9Iqxah7398MjN10mbrGeArqQsDjSkDmvMyKIIRjDOXzI6aqpoTOWH3f+ybRXGSh48fjuqDrRuD8jN746zwdo3puF5ceGx95pZYIhDKVd1LuyskFRa+v4ltHL3Z+suBGLjJwfs5yUWrLuq7m3frT3jpZk5gCBxGU+trnuC8fBuimwDr8GgIIDN9cTVaW3JQPVtfkXeCk9OYwKsNIxT3bxAxZCAnw5XNKRxPk2itelfou+SYCCSSfCcXNnKbbRcVif9TU/towyWM4R2ZRmsba/2R5+mYVa4fAjOJG1XId8p0C62S6N2RAgMBAAECggEAVHXHbdeJi6FJUonTZAG4Z+EPItN+GHFEgOvAliFGRVws4g0T4WCfrgvnp4X6X5yWaIimQyPTtcxltxRybAFHU36ISLOfOVrvhpg2d/5owsTTKHf5uSmE+V+B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RuHph9bL0MXMJZh/zFsQE4YWc4xiFsYvU0D+mBEVLjcMKi";  
//    		
//	// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
//    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvwkkuX6qNi9P5Ss2XIy7ErMLpxIF60RZQUAPSKsWoe9/fDIzddJm6xngK6kLA40pA5rzMiiCEYwzl8yOmqqaEzlh93/sm0VxkoePH47qg60bg/Ize+Os8HaN6bheXHhsfeaWWCIQylXdS7srJBUWvr+JbRy92frLgRi4ycH7OclFqy7qu5t360946WZOYAgcRlPra57gvHwbopsA6/BoCCAzfXE1WltyUD1bX5F3gpPTmMCrDSMU928QMWQgJ8OVzSkcT5NorXpX6LvkmAgkknwnFzZym20XFYn/U1P7aMMljOEdmUZrG2v9kefpmFWuHwIziRtVyHfKdAutkujdkQIDAQAB";

    
    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String notify_url = "http://127.0.0.1/BuyCarThree.do";

	// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String return_url = "http://127.0.0.1/paySuccess.do";

	// 签名方式
	public static String sign_type = "RSA";
	
	// 字符编码格式
	public static String charset = "utf-8";
	
	// 支付宝网关
	public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
	
	// 支付宝网关
	public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /** 
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
